package LexicalAnalyzer;


/**
 * 
 * @author vcolegro
 *
 */
public class Punctuation extends Token{
	// {}()[];
	public Punctuation(String s) throws RuntimeException {
		super("");
		char ch = s.charAt(0);
		type = 3;
		
		switch (ch){
		case '{':
			this.setContent("lbrace");
			break;
		case '}':
			this.setContent("rbrace");
			break;
		case '(':
			this.setContent("lparen");
			break;
		case ')':
			this.setContent("rparen");
			break;
		case '[':
			this.setContent("lbracket");
			break;
		case ']':
			this.setContent("rbracket");
			break;
		case ';':
			this.setContent("semic");
			break;
		case ',':
			this.setContent("comma");
			break;
		default:
			this.setContent("Error: Invalid Punctuation");
			throw new RuntimeException("Invalid Punctuation");
		}
	}

}
	
